public with sharing class Assignment {
    public String submit { get; set; }
    public String owner { get; set; }
    
string search1;
string search;
String use;
boolean select1;
public string getuse()
{return use;}

public String getSelect1() {
        return null;
    }
public void setselect1(boolean f)
    {
    select1=f;
    }
List<account> result;
List<account> result1;


public string getsearch(){
return search;}
public void setsearch(string s){
search=s;
search1='%' +s+ '%';}
public list<account> getresult(){

return result;
}
public PageReference search() {
use = UserInfo.getUserId();
if (select1)
{
result=(list<account>)[select name, industry, rating,account_priority__c,owner__c from account where (name like :search1 or industry like:search or rating like:search or
account_region__c like:search or account_priority__c like:search or account_summary__c like:search) and owner__c like:use];
}
else
{
result=(list<account>)[select name from account where name like :search1 or industry Like:search1 or rating Like:search1 or
account_region__c Like:search1 or account_priority__c Like:search1 or account_summary__c Like:search1];
}
        return null;
   }   
 public list<account> getresult1(){

return result1;
}              
  public PageReference submit() {
  result1=(list<account>)[select name, industry, rating,account_priority__c from account where name like :search1 or industry Like:search1 or rating Like:search1 or
    account_region__c Like:search1 or account_priority__c Like:search1 or account_summary__c Like:search1];
        return null;
         }       
}